CREATE TABLE [dbo].[TDANTC_LETR]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[CO_UNID_CONC] [dbo].[TD_VC_003] NOT NULL,
[NU_AMAR] [dbo].[TD_VC_008] NOT NULL,
[FE_AMAR] [dbo].[TD_DT_001] NOT NULL,
[NU_SECU] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TDANTC_LE__NU_SE__75035A77] DEFAULT ((0)),
[NU_LETR_CLIE] [dbo].[TD_VC_020] NULL,
[CO_MONE_LETR] [dbo].[TD_VC_003] NULL,
[IM_LETR] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDANTC_LE__IM_LE__75F77EB0] DEFAULT ((0)),
[CO_TIPO_DOCU] [dbo].[TD_VC_003] NULL,
[NU_DOCU_CLIE] [dbo].[TD_VC_020] NULL,
[CO_MONE_DOCU] [dbo].[TD_VC_003] NULL,
[IM_DOCU] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDANTC_LE__IM_DO__76EBA2E9] DEFAULT ((0)),
[CO_ENTI] [dbo].[TD_VC_020] NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDANTC_LE__CO_US__77DFC722] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDANTC_LE__FE_US__78D3EB5B] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDANTC_LE__CO_US__79C80F94] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDANTC_LE__FE_US__7ABC33CD] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDANTC_LETR] ADD CONSTRAINT [PK__TDANTC_L__F88147646DAD1CC9] PRIMARY KEY CLUSTERED  ([CO_EMPR], [CO_UNID_CONC], [NU_AMAR], [FE_AMAR], [NU_SECU]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDANTC_LETR] ADD CONSTRAINT [FK__TDANTC_LETR__26D08B8C] FOREIGN KEY ([CO_EMPR], [CO_UNID_CONC], [NU_AMAR], [FE_AMAR]) REFERENCES [dbo].[TCANTC_LETR] ([CO_EMPR], [CO_UNID_CONC], [NU_AMAR], [FE_AMAR])
GO
